<?php

namespace App\Models;

use App\Traits\Model as ModelTrait;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class UserRecharge extends Model
{
    protected $table = 'user_recharge';
    use HasFactory;
    use ModelTrait;

    public static $pay_status =  [1=>'未支付', 2=>'支付成功', 3=>'支付超时'];

    public function setPayTimeAttribute($value){
        $this->attributes['pay_time'] = strtotime($value);
    }

    public function getPayTimeAttribute($value){
        return date('Y-m-d H:i:s', $value);
    }


}
